package com.demo2;

public class Student {
    private String name;
    private int age;

//    不带参的构造方法
    public Student(){

    }
//    带多个参的构造方法
    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return  this.name;
    }
    public void setAge(int age){
        this.age = age;
    }
    public int getAge(){
        return this.age;
    }

    public String show(){
        return getAge() + "----" + getName();
    }
}
